package niuke;

import java.util.Scanner;

public class 求和 {

    static int n,sum;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        sum = scanner.nextInt();
        if(n>sum){
            n = sum;
        }
        dfs(1,0,0,new int[n]);
    }

    public static void dfs(int p, int count,int k,int a[]) {
        for(int i=p;i<=n;i++){
            count = count + i;
            a[k] = i;
            if(count>sum){
                count =  count - i;
                continue;
            }
            else if(count == sum){
                print(a,k);
                return;
            }
            dfs(i+1,count,k+1,a);
            count =  count - i;
        }
    }

    public static void print(int[] a,int k){
        String str = "";
        for(int i=0;i<=k;i++){
            str = str + a[i] +" ";
        }
        System.out.println(str.trim());
    }
}
